namespace BinaryTree;

public class LC0094
{
    public IList<int> InorderTraversal(TreeNode root)
    {
        List<int> ret = new List<int>();

        innerInorderTraversal(root, ret);

        return ret;
    }

    private void innerInorderTraversal(TreeNode node, List<int> list)
    {
        if (node == null) return;
        innerInorderTraversal(node.left, list);
        list.Add(node.val);
        innerInorderTraversal(node.right, list);
    }
}